﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WCS_Entity.Prorocol
{
    /// <summary>
    /// 自动化设备协议表
    /// </summary>
    [SugarTable("WCS_Protocol", TableDescription = "TCP协议表")]
    public class ProtocolEntity
    {
        /// <summary>
        /// 协议类型ID
        /// </summary>
        [Display(Name = "协议类型ID")]
        [SugarColumn(ColumnDescription = "协议类型ID", IsPrimaryKey = true, IsIdentity = true)]
        [Required(ErrorMessage = "请输入{0}")]
        public System.Int32 id { get; set; }
        /// <summary>
        /// 协议类型
        /// </summary>
        [Display(Name = "协议类型")]
        [SugarColumn(ColumnDescription = "协议类型")]
        public string protocolType { get; set; }
        /// <summary>
        /// 报文类型
        /// </summary>
        [Display(Name = "报文类型")]
        [SugarColumn(ColumnDescription = "报文类型")]
        public string messageType { get; set; }
        /// <summary>
        /// 报文发送源
        /// </summary>
        [Display(Name = "报文发送源")]
        [SugarColumn(ColumnDescription = "报文发送源")]
        public string sender { get; set; }
        /// <summary>
        /// 字段内容
        /// </summary>
        [Display(Name ="字段内容")]
        [SugarColumn(ColumnDescription = "字段内容")]
        public string fieldInfo { get; set; }
        /// <summary>
        /// 字段在报文中的索引
        /// </summary>
        [Display(Name ="报文中索引")]
        [SugarColumn(ColumnDescription = "报文中索引")]
        public int fieldIndex { get; set; }
        /// <summary>
        /// 是否透传
        /// </summary>
        [Display(Name = "是否透传")]
        [SugarColumn(ColumnDescription = "是否透传")]
        public bool isSerialNet { get; set; }
        /// <summary>
        /// 字段描述
        /// </summary>
        [Display(Name = "字段描述")]
        [SugarColumn(ColumnDescription = "字段描述")]
        public string describe { get; set; }
        /// <summary>
        /// 预留字段1
        /// </summary>
        [SugarColumn(ColumnName = "EXTEND1")]
        public string Extend1 { get; set; }

        /// <summary>
        /// 预留字段2
        /// </summary>
        [SugarColumn(ColumnName = "EXTEND2")]
        public string Extend2 { get; set; }

        /// <summary>
        /// 预留字段3
        /// </summary>
        [SugarColumn(ColumnName = "EXTEND3")]
        public string Extend3 { get; set; }

        /// <summary>
        /// 预留字段4
        /// </summary>
        [SugarColumn(ColumnName = "EXTEND4")]
        public string Extend4 { get; set; }

        /// <summary>
        /// 预留字段5
        /// </summary>
        [SugarColumn(ColumnName = "EXTEND5")]
        public string Extend5 { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        [SugarColumn(ColumnDescription = "创建时间")]
        [Required(ErrorMessage = "请输入{0}")]
        public System.DateTime createTime { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        [Display(Name = "更新时间")]
        [SugarColumn(ColumnDescription = "更新时间", IsNullable = true)]
        public System.DateTime? updataTime { get; set; }
        /// <summary>
        /// 删除标志 有数据就是删除
        /// </summary>
        [Display(Name = "删除标志 有数据就是删除")]
        [SugarColumn(ColumnDescription = "删除标志 有数据就是删除")]
        [Required(ErrorMessage = "请输入{0}")]
        public System.Boolean isDelete { get; set; }
    }
}
